home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / kparts / dockmainwindow.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-10-10  |  2.6 KB  |  89 lines

  1. /* This file is part of the KDE project
  2.    Copyright (C) 2000 Falk Brettschneider <gigafalk@yahoo.com>
  3.              (C) 1999 Simon Hausmann <hausmann@kde.org>
  4.              (C) 1999 David Faure <faure@kde.org>
  5.  
  6.    This library is free software; you can redistribute it and/or
  7.    modify it under the terms of the GNU Library General Public
  8.    License as published by the Free Software Foundation; either
  9.    version 2 of the License, or (at your option) any later version.
  10.  
  11.    This library is distributed in the hope that it will be useful,
  12.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14.    Library General Public License for more details.
  15.  
  16.    You should have received a copy of the GNU Library General Public License
  17.    along with this library; see the file COPYING.LIB.  If not, write to
  18.    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  19.    Boston, MA 02110-1301, USA.
  20. */
  21. #ifndef __DOCKMAINWINDOW_H
  22. #define __DOCKMAINWINDOW_H
  23.  
  24. #include <qptrlist.h>
  25. #include <kaction.h>
  26.  
  27. #include <kdockwidget.h>
  28.  
  29. #include <kparts/part.h>
  30.  
  31. class QString;
  32.  
  33. namespace KParts
  34. {
  35.  
  36. class DockMainWindowPrivate;
  37.  
  38. /**
  39.  * A KPart-aware main window with ability for docking widgets, whose user interface is described in XML.
  40.  *
  41.  * Inherit your main dock-window from this class
  42.  * and don't forget to call setXMLFile() in the inherited constructor.
  43.  *
  44.  * It implements all internal interfaces in the case of a KDockMainWindow as host:
  45.  * the builder and servant interface (for menu merging).
  46.  */
  47. class KPARTS_EXPORT DockMainWindow : public KDockMainWindow, virtual public PartBase
  48. {
  49.   Q_OBJECT
  50.  public:
  51.   /**
  52.    * Constructor, same signature as KDockMainWindow.
  53.    */
  54.   DockMainWindow( QWidget* parent = 0L, const char *name = 0L, WFlags f = WDestructiveClose );
  55.   /**
  56.    * Destructor.
  57.    */
  58.   virtual ~DockMainWindow();
  59.  
  60. protected slots:
  61.  
  62.   /**
  63.    * Create the GUI (by merging the host's and the active part's)
  64.    *
  65.    * Called on startup and whenever the active part changes.
  66.    * For this you need to connect this slot to the
  67.    * PartManager::activePartChanged() signal
  68.    * @param part The active part (set to 0L if no part).
  69.    */
  70.   void createGUI( KParts::Part * part );
  71.  
  72.   /**
  73.    * Called when the active part wants to change the statusbar message.
  74.    * Reimplement if your dock-mainwindow has a complex statusbar
  75.    * (with several items)
  76.    */
  77.   virtual void slotSetStatusBarText( const QString & );
  78.  
  79. protected:
  80.     virtual void createShellGUI( bool create = true );
  81.  
  82.  private:
  83.   DockMainWindowPrivate *d;
  84.   };
  85.  
  86. }
  87.  
  88. #endif
  89.